package com.ptu.spzx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ptu.spzx.domain.Question.po.QuestionExampaper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface QuestionExampaperMapper extends BaseMapper<QuestionExampaper> {

    @Delete("UPDATE question_exampaper SET is_delete=1 WHERE ep_id=#{epId}")
    void deleteByEpId(Long epId);

    @Select("SELECT parent_id FROM question_exampaper WHERE ep_id=#{epId}")
    List<Long> selectByEpId(Long epId);
}
